package org.bite.springbootdemo;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static java.lang.Thread.sleep;

@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String hello(){
        return"Hello Spring Boot";
    }
    @RequestMapping("/Integer")
    public String getInteger() throws InterruptedException {
        while(true){
            String time = fun();
            sleep(100);
            return time;
        }
    }
    @RequestMapping("/yM@foxmail")
    public String fun() throws InterruptedException {
            String str = "The Time is:"+System.currentTimeMillis();
            return str;
    }
}
